package com.example.newspublish.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.newspublish.pojo.dto.NewsPageDTO;
import com.example.newspublish.pojo.entity.News;
import com.example.newspublish.pojo.form.NewsForm;
import com.example.newspublish.util.result.PageResult;
import com.example.newspublish.util.result.Result;

import java.util.List;

public interface NewsService extends IService<News> {

    Result getNewsListById(Long categoryId);

    Result getNewsList();

    Result getNewDetailById(Long id);

    Result addNew(NewsForm newsForm);

    Result deleteNewById(Long id);


    List<News> search(String key);

    Page<News> pageQuery(int pageNum, int pageSize);

    List<News> getNewsByUserName(String username);

//    PageResult pageQuery(NewsPageDTO newsPageDTO);
}
